package com.xidian.yunwudemo.config;

import com.xidian.yunwudemo.common.config.BaseSwaggerConfig;
import com.xidian.yunwudemo.common.domin.SwaggerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import springfox.documentation.service.ApiInfo;

/**
 * Swagger2 配置类
 * 在与springboot集成时，放在与Application.java同级目录下
 * 通过@Configuration注解，让spring来加载配置类
 * 通过@EnableSwagger2注解来启动Swagger2
 */

@Configuration
@EnableSwagger2
public class Swagger2Config extends BaseSwaggerConfig {

    @Override
    public SwaggerProperties swaggerProperties() {
        return  SwaggerProperties.builder()
                .apiBasePackage("com.xidian.yunwudemo")
                .title("云雾混构 APIs")
                .contactName("vouidwx")
                .description("云雾混构demo的接口文档")
                .enableSecurity(true)
                .version("1.0")
                .build();
    }

}
